package com.h3c.ptability.dto;

import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.ArrayList;
import java.util.List;

/**
 * 下拉菜单选项框
 */
@Data
@NoArgsConstructor
public class OptionsDTO {

    /**
     * 选项框 值
     */
    private String value;

    /**
     * 选项框 名称
     */
    private String label;

    /**
     * 关联项 唯一键
     */
    private String key;

    private Integer level;

    /**
     * 部门chain
     */
    private String deptNameChain;

    /**
     * 是否有权限  false无   true有
     */
    private Boolean disabled;

    /**
     * 部门层级
     */
    private Integer deptLevel;

    /**
     * 部门层级
     */
    private Integer parentId;

    /**
     * 一级部门code
     */
    private String dept1Code;

    /**
     * 是否展开
     */
    private Boolean expand = false;

    /**
     * 子类
     */
    private List<OptionsDTO> children = new ArrayList<>();

    public OptionsDTO(String value, String label) {
        this.value = value;
        this.label = label;
    }

    public OptionsDTO(String value, String label, String key, String deptNameChain, Integer level) {
        this.value = value;
        this.label = label;
        this.key = key;
        this.deptNameChain = deptNameChain;
        this.level = level;
    }
}
